{extends file="../global.html"}
{block name=body}


<form class="layui-form" action="{if $res[0]}{url('run/Configure/update')}{else}{url('run/Configure/insert')}{/if}" method="post" enctype="multipart/form-data">
{if $error}
 <div class="layui-form-item">
     <div class="layui-input-block">
    <p style="color:red;font-size:30px">{$error}</p>
    </div>
    
  </div>
   
{else}
    <p>{$error}</p>
{/if}
   <div class="layui-form-item">
	    <label class="layui-form-label">所属商品</label>
	    <div class="layui-input-block">
	      <select  name="goods_id" lay-verify="required">
         {if $res[0]}
	        <option  value="{$res[0].goods_id}">{$res[0].goods_name}</option>
	      {else}
           <option  value="{$res[1].goods_id}">{$res[1].goods_name}</option>
        {/if}
	      </select>
	    </div>
	  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">车身结构</label>
    <div class="layui-input-block">
    {if $res[0]}
     
        <input type="text" name="car_structure" required  lay-verify="required" value="{$res[0].car_structure}" autocomplete="off" class="layui-input">
    {else}
       <input type="text" name="car_structure" required  lay-verify="required" placeholder="请输入车身结构" autocomplete="off" class="layui-input">
      
     {/if}
    </div>
  
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">发动机</label>
    <div class="layui-input-block">
     {if $res[0]}
     <input type="text" name="car_engine" required  lay-verify="required" value="{$res[0].car_engine}" autocomplete="off" class="layui-input">
      {else}
       <input type="text" name="car_engine" required  lay-verify="required" placeholder="请输入发动机型号" autocomplete="off" class="layui-input">
       
      {/if}
    </div>
  </div>
   <div class="layui-form-item">
    <label class="layui-form-label">驱动方式</label>
    <div class="layui-input-block">
     {if $res[0]}
     <input type="text" name="car_drive" required  lay-verify="required" value="{$res[0].car_drive}" autocomplete="off" class="layui-input">
      {else}
       <input type="text" name="car_drive" required  lay-verify="required" placeholder="请输入驱动方式" autocomplete="off" class="layui-input">
       
      {/if}
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">综合油耗</label>
    <div class="layui-input-block">
    {if $res[0]}
      <input type="text" name="car_oil" required  lay-verify="required" value="{$res[0].car_oil}" autocomplete="off" class="layui-input">
     {else}
     <input type="text" name="car_oil" required  lay-verify="required" placeholder="请输入综合油耗" autocomplete="off" class="layui-input">
      
     {/if}
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label" style="width: 75px;">车身大小(长/宽/高)</label>
    <div class="layui-input-block">
    {if $res[0]}
      <input type="text" name="car_size" required  lay-verify="required" value="{$res[0].car_size}" autocomplete="off" class="layui-input">
    {else}
     <input type="text" name="car_size" required  lay-verify="required" placeholder="请输入车身大小(长/宽/高)" autocomplete="off" class="layui-input">
       
    {/if}
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">变速箱</label>
    <div class="layui-input-block">
    {if $res[0]}
     <input type="text" name="car_gearbox" required  lay-verify="required" value="{$res[0].car_gearbox}" autocomplete="off" class="layui-input">
    {else}
     <input type="text" name="car_gearbox" required  lay-verify="required" placeholder="请输入变速箱" autocomplete="off" class="layui-input">
      
    {/if}
    </div>
  </div>
  
  <div class="layui-form-item">
    <label class="layui-form-label">燃料形式</label>
    <div class="layui-input-block">
    {if $res[0]}
      <input type="text" name="car_fuel" required  lay-verify="required" value="{$res[0].car_fuel}" autocomplete="off" class="layui-input">
   {else}
    <input type="text" name="car_fuel" required  lay-verify="required" placeholder="请输入燃料形式" autocomplete="off" class="layui-input">
      
   {/if}
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">车辆配色</label>
    <div class="layui-input-block">
    {if $res[0]}
    <input type="text" name="car_color" required  lay-verify="required" value="{$res[0].car_color}" autocomplete="off" class="layui-input">
    {else}
      <input type="text" name="car_color" required  lay-verify="required" placeholder="请输入车辆配色" autocomplete="off" class="layui-input">
      
    {/if}
    </div>
  </div>
  
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">{if $res[0]}立即修改{else}立即提交{/if}</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
 
<script>
//Demo

</script>

{/block}
 
